module Api
  class ImageController < ApplicationController
    include Apiable

    def new
      image = Image.create(base_64_encoded_data: params[:image],
                          image_type: IMAGE_TYPE["其他图片"],
                          owner: params[:owner])
      
      data! url: image.url
    end
  end
end